#pragma once

#include "Types.h"

namespace Vortex { namespace Wrapper { namespace Direct3D {

	ref class Direct3DDevice9;

	///<summary>Wrapper of IDirect3DIndexBuffer9 interface</summary>
	public ref class Direct3DIndexBuffer9 {
		IDirect3DIndexBuffer9* _handle;

	public:

		///<summary>Direct3DDevice handle</summary>
		property IntPtr Handle { IntPtr get() { return IntPtr(_handle); } }

		property IDirect3DIndexBuffer9* NativeHandle { IDirect3DIndexBuffer9* get() { return _handle; } }

		Direct3DIndexBuffer9(IDirect3DIndexBuffer9* handle);

		~Direct3DIndexBuffer9();

		HResult Lock(UINT offsetToLock, UINT sizeToLock, [Out] void*% pData, D3DLockFlags lockFlags);

		HResult Unlock();

	};
}}}